import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-10-16
 * Time: 20:08
 */
public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = in.nextInt();
        int[] a = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }
        int l = 0;
        int r = n;
        for(int i = 0;i < n;i++) {
            int sum = 0;
            int j = i;
            boolean flag = false;
            for(; j < n; j++) {
                sum += a[j];
                if(sum >= x) {
                    flag = true;
                    break;
                }
            }
            if(flag && r-l > j-i) {
                l = i;
                r = j;
            }
        }
        System.out.println(l+" "+r);
    }
}
